//
//  KTURLSessionTask.m
//  BoWuGuan
//
//  Created by 梁尚嘉 on 2016/10/31.
//  Copyright © 2016年 KT. All rights reserved.
//

#import "KTURLSessionTask.h"
//#import "HUD_Utils.h"
@interface KTURLSessionTask ()
@property (nonatomic, strong, readwrite) NSURLSessionTask *subTask;
@end

@implementation KTURLSessionTask

+ (instancetype)taskWithSubTask:(NSURLSessionTask *)st
{
    KTURLSessionTask *task = [KTURLSessionTask new];
    task.subTask = st;
    return task;
}

- (void)cancel {
    if (self.subTask.state == NSURLSessionTaskStateRunning)
    {
        [self.subTask cancel];
        //[HUD_Utils HUDHide];
    }
}


@end
